Formalizing an Ssa-based Compiler for Verified Advanced Program Transformations

نویسندگان

  • Jianzhou Zhao
  • Steve Zdancewic
چکیده

FORMALIZING AN SSA-BASED COMPILER FOR VERIFIED ADVANCED PROGRAMTRANSFORMATIONSJianzhou ZhaoSupervisor: Steve Zdancewic Compilers are not always correct due to the complexity of language semantics and transformation algo-rithms, the trade-offs between compilation speed and verifiability, etc. The bugs of compilers can underminethe source-level verification efforts (such as type systems, static analysis, and formal proofs) and producetarget programs with different meaning from source programs. Researchers have used mechanized prooftools to implement verified compilers that are guaranteed to preserve program semantics and proved to bemore robust than ad-hoc non-verified compilers.The goal of the dissertation is to make a step towards verifying an industrial strength modern compiler—LLVM, which has a typed, SSA-based, and general-purpose intermediate representation, therefore allowingmore advanced program transformations than existing approaches. The dissertation formally defines thesequential semantics of the LLVM intermediate representation with its type system, SSA properties, memorymodel, and operational semantics. To design and reason about program transformations in the LLVM IR,we provide tools for interacting with the LLVM infrastructure and metatheory for SSA properties, memorysafety, dynamic semantics, and control-flow-graphs. Based on the tools and metatheory, the dissertationimplements verified and extractable applications for LLVM that include an interpreter for the LLVM IR, atransformation for enforcing memory safety, translation validators for local optimizations, and verified SSAconstruction transformation.This dissertation shows that formal models of SSA-based compiler intermediate representations canbe used to verify low-level program transformations, thereby enabling the construction of high-assurancecompiler passes.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Verifying Fast and Sparse SSA-Based Optimizations in Coq

The Static Single Assignment (SSA) form is a predominant technology in modern compilers, enabling powerful and fast program optimizations. Despite its great success in the implementation of production compilers, it is only very recently that this technique has been introduced in verified compilers. As of today, few evidence exist on that, in this context, it also allows faster and simpler optim...

متن کامل

A Formally Verified SSA-Based Middle-End - Static Single Assignment Meets CompCert

CompCert is a formally verified compiler that generates compact and efficient PowerPC, ARM and x86 code for a large and realistic subset of the C language. However, CompCert foregoes using Static Single Assignment (SSA), an intermediate representation that allows for writing simpler and faster optimizers, and is used by many compilers. In fact, it has remained an open problem to verify formally...

متن کامل

Mechanized Verification of Computing Dominators for Formalizing Compilers

One prerequisite to the formal verification of modern compilers is to formalize computing dominators, which enable SSA forms, advanced optimizations, and analysis. This paper provides an abstract specification of dominance analysis that is sufficient for formalizing modern compilers; it describes a certified implementation and instance of the specification that is simple to design and reason ab...

متن کامل

Securing the SSA Transform

Modern optimizing compilers use the single static assignment (SSA) format for programs, as it simplifies program analysis and transformation. A source program is converted to an equivalent SSA form before it is optimized. The conversion may, however, create a less secure program if fresh SSA variables inadvertently leak sensitive values that are masked in the original program. This work defines...

متن کامل

NAC: A lightweight intermediate representation for ASIP compilers

ASIP processors are tuned for optimized mapping of narrow application sets in heterogeneous platforms. Their successful development relies on compiler-based design space exploration. The careful design of the compiler intermediate language is a necessity, due to its dual purpose as both the program representation and an abstract target machine. Its design affects the complexity, efficiency and ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013